package com.wxxymakers.cklabrecruit.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * @AUTHOR soft
 * @DATE 2018/11/5 22:55
 * @DESCRIBE 时间工具
 */
public class DateUtils {

    public static Date[] getBetween(Date date) {
        int year = date.getYear();
        Date start = new Date(year, 0, 1);
        Date end = new Date(year, 11, 31);
        return new Date[]{start, end};
    }

    public static String getTime() {
        LocalDateTime now = LocalDateTime.now();
        return now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
    }
}
